<template>
  <div class="box">
    <div class="content-box">
      <img
        v-if="current[0].imgList.length"
        class="banner-image"
        :src="current[0].imgList[0].url"
      />
      <div v-if="!current[0].imgList.length" class="banner-image"></div>
      <!-- :src="$utils.staticPath + `images/village/banner3.png`" -->
      <div class="header-option">
        <div
          style="text-align: center"
          v-for="item in optionList"
          :key="item.key"
        >
          <img class="imageIcon" :src="item.icon" alt="" />
          <div>{{ item.title }}</div>
        </div>
      </div>
      <div class="list-box">
        <div class="title">
          <span>热门大厦</span>
          <img
            style="width: 24px; height: 24px"
            :src="$utils.staticPath + `images/village/hot.png`"
            alt=""
          />
        </div>
        <a-divider />
        <a-row class="list" v-for="i in 2" :key="i">
          <a-col class="left">
            <img
              style="width: 100%; height: 100%; border-radius: 5px"
              :src="
                $utils.staticPath + `images/village/type/officeBuildingBg.jpg`
              "
              alt=""
            />
          </a-col>
          <a-col class="right">
            <div class="title">亚夏大厦</div>
            <div class="text">高新区</div>
            <div class="text">距离「3号线」约6米</div>
            <div class="text">近30内有1人关注</div>
            <div style="color: #c43332">
              <span style="font-size: 18px; font-weight: bold">￥33 </span>
              <span style="font-size: 12px">元/m²/月 起</span>
            </div>
          </a-col>
        </a-row>
        <div class="check-more">查看更多</div>
      </div>
    </div>
  </div>
</template>

<script>
import { defineComponent } from "vue";
import utils from "../../../common/utils/utils";
export default defineComponent({
  name: "businessMobile",
  props: {
    current: {
      type: Array,
      default: () => {
        return [];
      },
    },
  },
  setup() {
    const optionList = [
      {
        icon: utils.staticPath + `images/village/hailiangfangyuan.png`,
        title: "海量房源",
        key: "bar_1",
        type: "route",
        url: "/pages/clue/roomList?title=海量房源",
      },
      {
        icon: utils.staticPath + `images/village/zushangpu.png`,
        title: "租商铺",
        key: "bar_3",
        type: "route",
        url: "/pages/clue/villageList?title=租商铺",
      },
      {
        icon: utils.staticPath + `images/village/weituozhaofang.png`,
        title: "委托找房",
        key: "bar_5",
        type: "route",
        url: "/pages/clue/find",
      },
      {
        icon: utils.staticPath + `images/village/toufangfangyuan.png`,
        title: "投放房源",
        key: "bar_6",
        type: "link",
        url: "h5_orgs",
      },
    ];
    const getRoomList = [];

    return {
      optionList,
      getRoomList,
    };
  },
});
</script>

<style lang="less" scoped>
.box {
  width: 100%;
  height: 100%;
  .content-box {
    max-width: 375px;
    height: 680px;
    background: #fff;
    margin: 50px auto;
    position: relative;
    .banner-image {
      width: 100%;
      height: 265px;
      object-fit: cover;
    }
    .header-option {
      position: absolute;
      left: 10px;
      right: 10px;
      height: 80px;
      top: 190px;
      padding: 0 10px;
      background-color: #fff;
      border-radius: 20px;
      box-shadow: 0px 1px 4px 2px rgba(0, 0, 0, 0.2);
      display: flex;
      align-items: center;
      justify-content: space-between;
      .imageIcon {
        width: 30px;
        height: 30px;
      }
    }
    .list-box {
      padding: 20px 10px;
      .title {
        display: flex;
        align-items: center;
        font-size: 16px;
        color: #000;
        font-weight: bold;
      }
      :deep(.ant-divider-horizontal) {
        margin: 10px 0;
      }
      .left {
        width: 130px;
        height: 110px;
        border-radius: 5px;
        margin-right: 10px;
      }
      .right {
        .title {
          font-size: 16px;
          color: #333;
          font-weight: 600;
        }
        .text {
          color: #a1a1a1;
        }
      }
      .list {
        padding: 10px 0;
        border-bottom: 1px solid #f0f0f0;
      }
      .check-more {
        width: 100%;
        height: 40px;
        line-height: 40px;
        background-color: #e8f5fd;
        color: #4ca1e2;
        text-align: center;
        font-weight: bold;
      }
    }
  }
}
</style>
